package com.internetCafes.spms.web.certificate.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.internetCafes.spms.core.utils.DateUtils;
import com.internetCafes.spms.web.certificate.entity.CertiTransactionInfo;

import java.util.Date;
import java.util.List;

public class CertiTransactionInfoVo extends CertiTransactionInfo {
    /**
     * 租户id
     */
    private Long tenantId;

    /**
     * 证书id
     */
    private Long certificateId;

    /**
     * 证书状态
     */
    private Integer status;

    /**
     * 部门id
     */
    private Long deptId;

    /**
     * 姓名
     */
    private String name;

    /**
     * 身份证号
     */
    private String idCard;

    /**
     * 性别 0:未知 1:男 2:女
     */
    private Integer gender;

    /**
     * 手机号码
     */
    private String mobile;

    /**
     * 学历
     */
    private String academic;

    /**
     * 职称
     */
    private String jobGrade;

    /**
     * 证书照片列表
     */
    private String certiPic;

    /**
     * 合同照片列表
     */
    private String constractPic;

    /**
     * 缴费凭证列表
     */
    private String payPic;

    /**
     * 部门名称
     */
    private String deptName;

    /**
     * 证书类型 1在职员工,2兼职
     */
    private Integer certificateType;

    /**
     * 证书业务类型
     */
    private String pIdType;

    /**
     * 证书业务类型
     */
    private String idType;

    /**
     * 专业
     */
    private String profession;

    /**
     * 注册类型
     */
    private Integer registerType;

    /**
     * 证书号
     */
    private String certificateNo;

    /**
     * 到期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date validityEndTime;


    private List<CertiTransactionInfo> certiTransactionInfoList;

    public String getPayPic() {
        return payPic;
    }

    public void setPayPic(String payPic) {
        this.payPic = payPic;
    }

    public List<CertiTransactionInfo> getCertiTransactionInfoList() {
        return certiTransactionInfoList;
    }

    public void setCertiTransactionInfoList(List<CertiTransactionInfo> certiTransactionInfoList) {
        this.certiTransactionInfoList = certiTransactionInfoList;
    }


    @Override
    public Long getCertificateId() {
        return certificateId;
    }

    @Override
    public void setCertificateId(Long certificateId) {
        this.certificateId = certificateId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
    public Long getTenantId() {
        return tenantId;
    }

    public void setTenantId(Long tenantId) {
        this.tenantId = tenantId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getAcademic() {
        return academic;
    }

    public void setAcademic(String academic) {
        this.academic = academic;
    }

    public String getJobGrade() {
        return jobGrade;
    }

    public void setJobGrade(String jobGrade) {
        this.jobGrade = jobGrade;
    }

    public String getCertiPic() {
        return certiPic;
    }

    public void setCertiPic(String certiPic) {
        this.certiPic = certiPic;
    }

    public String getConstractPic() {
        return constractPic;
    }

    public void setConstractPic(String constractPic) {
        this.constractPic = constractPic;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public Integer getCertificateType() {
        return certificateType;
    }

    public void setCertificateType(Integer certificateType) {
        this.certificateType = certificateType;
    }

    public String getIdType() {
        return idType;
    }

    public void setIdType(String idType) {
        this.idType = idType;
    }

    public String getProfession() {
        return profession;
    }

    public void setProfession(String profession) {
        this.profession = profession;
    }

    public Integer getRegisterType() {
        return registerType;
    }

    public void setRegisterType(Integer registerType) {
        this.registerType = registerType;
    }

    public String getCertificateNo() {
        return certificateNo;
    }

    public void setCertificateNo(String certificateNo) {
        this.certificateNo = certificateNo;
    }

    public Date getValidityEndTime() {
        return validityEndTime;
    }

    public void setValidityEndTime(Date validityEndTime) {
        this.validityEndTime = validityEndTime;
    }

    public String getpIdType() {
        return pIdType;
    }

    public void setpIdType(String pIdType) {
        this.pIdType = pIdType;
    }

    public boolean getWarning(){
        if(super.getTransactionEndTime() == null){
            return false;
        }
        return super.getTransactionEndTime().getTime() > new Date().getTime() && super.getTransactionEndTime().getTime() < DateUtils.getBeAfDay(15).getTime();
    }
}
